<!--
 * @Description: file content
 * @Author: Zt2tzzt
 * @Date: 2021-09-12 22:01:19
 * @LastEditors: ZeT1an
 * @LastEditTime: 2022-08-21 19:12:16
 * @LastEditContent: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>

  <template id="my-app">
    <div>
      <h2>{{counter}}</h2>
      <button @click="increment">+</button>
      <button @click="decrement">-</button>
    </div>
  </template>

  <script src="./JS/vue.global.js"></script>
  <script>
    Vue.createApp({
      data: function() {
        return {
          counter: 100
        }
      },
      template: '#my-app',
      methods: {
        increment() {
          this.counter++
        },
        decrement() {
          this.counter--
        }
      }
    }).mount('#app')
  </script>

</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>
  <template id="my-app">
    <div>
      <h2>{{title}}</h2>
      <p>
        {{content}}
      </p>
    </div>
  </template>
</body>
</html>

